#include <cassert>
#include <unordered_set>
#include "reflector.hpp"

int main()
{
    using namespace clay;

    Reflector<16> reflector;

    // Assert it will not map to itself.
    for (int i = 0; i < 16; i++) {
        assert(reflector.Map(i) != i);
    }

    // Assert it is injection.
    std::unordered_set<std::uint8_t> hash_table;
    for (int i = 0; i < 16; i++) {
        auto p = hash_table.insert(reflector.Map(i));
        assert(p.second);
    }

    // Assert it can reverse mapping.
    for (int i = 0; i < 16; i++) {
        assert(reflector.Map(reflector.Map(i)) == i);
    }

    return 0;
}